package com.sdj.quick.web.controller;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.sdj.quick.web.dto.TransRefundDTO;

@Controller
@RequestMapping("/refund")
public class TransRefundController extends BaseController{
	
	
	@RequestMapping("/toRefund")
	public String toTradingQuery(){
		return "transRefund";
	}
	
	
	@RequestMapping(value="/transRefund",method=RequestMethod.POST)
	public @ResponseBody String transRefund(TransRefundDTO transRefundDTO){
		logger.info("快捷退款发送请求参数对象:【{}】",transRefundDTO);
		String merKey = transRefundDTO.getMerKey();
		String path = quickConfig.getTransRefundUrl();
		Map<String,String> map = getPostResult(path,merKey,transRefundDTO);
		return JSON.toJSONString(map);
	}
	
}
